Skip to content

Conversation

@divipillai
Copy link
Contributor

@divipillai divipillai commented Oct 31, 2025

Updates to nrf_modem and socket header files
to improve modem library "limits" documentation.

Added Supported flags for socket functions section.

NCSDK-35090 and NCSDK-34607

@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Oct 31, 2025
@divipillai divipillai changed the title doc: Updates to nrf_modem and socket header files doc: Updates to nrf_modem and socket header files socket documentation Oct 31, 2025
@divipillai divipillai changed the title doc: Updates to nrf_modem and socket header files socket documentation doc: Updates to nrf_modem. socket header files, and socket documentation Oct 31, 2025
@divipillai divipillai force-pushed the NCSDK-35090_nrfsocket_header branch 2 times, most recently from 5f12e63 to dd78e8c Compare October 31, 2025 12:22
@divipillai divipillai marked this pull request as ready for review October 31, 2025 12:24
@divipillai divipillai requested review from a team as code owners October 31, 2025 12:24
Copy link
Contributor

@kacperradoszewski kacperradoszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since NRF_SO_SENDCB is mentioned here already, maybe we should wait until #1897 is merged

@divipillai divipillai force-pushed the NCSDK-35090_nrfsocket_header branch from dd78e8c to 758b8f9 Compare November 5, 2025 15:08
This flag is only supported for the :c:func:`nrf_send` and :c:func:`nrf_sendto` functions.
When this flag is used, the operation is blocked until the data has been acknowledged by the peer, if required by the network protocol, or until the timeout, given by the :c:macro:`NRF_SO_SNDTIMEO` socket option, is reached.
The valid timeout values are 1 to 600 seconds.
For TCP, the operation is blocked until the data is acknowledged by the peer, and for UDP, until the data is sent on-air by the modem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to refer to stream and datagram sockets instead of TCP and UDP, which are protocols.
There are more protocols for which this flag applies, but the socket types (stream, datagram) actually cover the behavior in all cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as below. Please check:

For the :c:macro:NRF_SOCK_STREAM socket type , the operation is blocked until the data is acknowledged by the peer, and for the :c:macro:NRF_SOCK_DGRAM socket type, until the data is sent on-air by the modem.

When this flag is used, the operation is blocked until the data has been acknowledged by the peer, if required by the network protocol, or until the timeout, given by the :c:macro:`NRF_SO_SNDTIMEO` socket option, is reached.
The valid timeout values are 1 to 600 seconds.
For TCP, the operation is blocked until the data is acknowledged by the peer, and for UDP, until the data is sent on-air by the modem.
This flag is useful in scenarios where data integrity and confirmation of receipt are critical.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flag has no effect on data integrity, only when the user needs confirmation that the data has been sent and, if supported by the protocol, confirmation that it has been received.

Copy link
Contributor Author

@divipillai divipillai Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as below:

This flag is useful in scenarios where confirmation of receipt is critical.

* :c:macro:`NRF_MSG_WAITACK`
Requests a blocking send operation until the request is acknowledged.
This flag is only supported for the :c:func:`nrf_send` and :c:func:`nrf_sendto` functions.
When this flag is used, the operation is blocked until the data has been acknowledged by the peer, if required by the network protocol, or until the timeout, given by the :c:macro:`NRF_SO_SNDTIMEO` socket option, is reached.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not very accurate. It could also be merged with the part below. What about:

When this flag is used, write operations on datagram sockets block until the data has been sent on air, and write operations on stream sockets block until data reception is acknowledged by the peer. The operation timeout can be configured using the ... socket option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated as below:

When this flag is used, write operations on datagram sockets are blocked until the data has been sent on air, and write operations on stream sockets are blocked until data reception is acknowledged by the peer.
The operation timeout can be configured using the :c:macro:NRF_SO_SNDTIMEO socket option.

cc: @kacperradoszewski .

Updates to nrf_modem and socket header files
to improve modem library "limits" documentation

Signed-off-by: divya pillai <[email protected]>
@divipillai divipillai force-pushed the NCSDK-35090_nrfsocket_header branch from 758b8f9 to 3427028 Compare November 7, 2025 15:59
Add section for Supported flags for socket functions

Signed-off-by: divya pillai <[email protected]>
@divipillai divipillai force-pushed the NCSDK-35090_nrfsocket_header branch from 3427028 to 752f111 Compare November 7, 2025 16:09
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants